import wxRequest from '@/utils/wxRequest.js'

//获取token
const getToken = (params) => {      
    return wxRequest.requestFun(params,'/Oauth/Token')
}

//获取微信TOKEN
const GetAccessToken = (params) => {
    return wxRequest.requestFun(params,'/api/WxOpen/GetAccessToken')
} 

//小程序登录凭证校验
const Code2Session = (params) => {
    return wxRequest.requestFun(params,'/api/WxOpen/Code2Session')
}

//微信用户注册
const WxUserRegister = (params) => {
    return wxRequest.requestFun(params,'/api/WxOpen/WxUserRegister')
}

//验证码短信发送
const SmsSendCode = (params) => {
    return wxRequest.requestFun(params,'/api/Common/SmsSendCode')
}

//用户手机绑定
const UpdateMemberPhone = (params) => {
    return wxRequest.requestFun(params,'/api/Member/UpdateMemberPhone')
}

//获取Banner图
const BannerList = (params) => {
    return wxRequest.requestFun(params,'/api/Common/BannerList')
}

//图文视栏目获取
const CategoryList = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/CategoryList')
}

//图文视、常见问题栏目文章获取
const ArticleList = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/ArticleList')
}

//首页图文视、常见问题栏目文章获取 根据点击量与发布时间排序 降序
const ArticleIndexList = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/ArticleIndexList')
}

//专家科室（栏目）
const ProfessorList = (params) => {
    return wxRequest.requestFun(params,'/api/MemberExpert/ProfessorList')
}

//专家列表
const ExpertList = (params) => {
    return wxRequest.requestFun(params,'/api/MemberExpert/ExpertList')
}

 //获取搜索热点
const SearchHotList= (params) => {
    return wxRequest.requestFun(params,'/api/Search/SearchHotList')
}


//(往期)图文视、常见问题栏目文章获取
const ArticleHistoryList = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/ArticleHistoryList')
}

//图文视评论列表
const ArticleCommendList = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/ArticleCommendList')
}

//图文视评论新增
const AddArticleCommend = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/AddArticleCommend')
}

//图文视相关推荐（根据文章Tag标签检索）
const ArticleSysRecommend = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/ArticleSysRecommend')
}

//图文视浏览量更新（无法取消，如已存在，直接返回）
const UpdateArticleHits = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/UpdateArticleHits')
}

//搜索结果页面（图文、视、常见问题，专家列表）
const SearchList = (params) => {
    return wxRequest.requestFun(params,'/api/Search/SearchList')
}

//图文视评论点赞（成功与取消，存在如果点击则可取消）
const UpdateArticleCommendLiked = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/UpdateArticleCommendLiked')
}

//图文视用户收藏（成功与取消，存在如果点击则可取消）
const UpdateArticleCollection = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/UpdateArticleCollection')
}

//图文视分享（无法取消，如已存在，直接返回）
const UpdateArticleShared = (params) => {
    return wxRequest.requestFun(params,'/api/CmsArticle/UpdateArticleShared')
}

//信息完善第一步
const addMemberRegisterStepOne = (params) => {
    return wxRequest.requestFun(params,'/api/MemberRegister/addMemberRegisterStepOne')
}

//信息完善第二步
const addMemberRegisterStepTwo = (params) => {
    return wxRequest.requestFun(params,'/api/MemberRegister/addMemberRegisterStepTwo')
}

//奶粉品牌 
const QueryMilkPowderList = (params) => {
    return wxRequest.requestFun(params,'/api/MemberRegister/QueryMilkPowderList')
}

//喂养方式
const QueryFeedingList = (params) => {
    return wxRequest.requestFun(params,"/api/MemberRegister/QueryFeedingList")
}

//育儿状态
const QueryChildcareList = (params) => {
    return wxRequest.requestFun(params,"/api/MemberRegister/QueryChildcareList")
}

//获取地区列表（省、市、区县）
const QueryRegionList = (params) => {
    return wxRequest.requestFun(params,"/api/Common/QueryRegionList")
}

//获取咨询人角色
const QueryConsultationRoleList = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/QueryConsultationRoleList")
}

//获取咨询年龄
const QueryConsultationAgeTypeList = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/QueryConsultationAgeTypeList")
}

//获取咨询自定义标签
const QueryConsultationTagList = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/QueryConsultationTagList") 
}

//用户咨询第一步 咨询人与被咨询人提交
const addConsultationStepOne = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/addConsultationStepOne")
}

//用户咨询第二步  被咨询人信息提交症状、就诊
const addConsultationStepTwo = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/addConsultationStepTwo")
}

//用户咨询第三步  查询咨询订单信息
const QueryConsultation = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/QueryConsultation")
}

//用户咨询第四步 订单提交（不可重复提交）
const addConsultationStepFour = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/addConsultationStepFour")
}

//咨询回复页面初始化数据接口（用户端）
const ConsultReply = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/ConsultReply")
}

//咨询回复页面初始化数据接口（专家端）
const ExpertConsultReply = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/ExpertConsultReply")
}

//查询新消息轮询接口
const GetNewMsg = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/GetNewMsg")
}

//发送消息
const SendMsg = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/SendMsg")
}
//图片上传（请参数小程序文件上传）  
const uploadFile = (params) => {
    return wxRequest.uploadFile(params,"/api/Common/UploadFile")
}
//会员中心 个人信息查询（扩展信息）
const QueryMemberInfo = (params) => {
    return wxRequest.requestFun(params,"/api/Member/QueryMemberInfo")
}

//会员中心收藏（图文、视、常见问题、关注专家、专家粉丝）
const MyCollectionList = (params) => {
    return wxRequest.requestFun(params,"/api/Member/MyCollectionList")
}

//会员中心用户历史记录
const MyHistroyList = (params) => {
    return wxRequest.requestFun(params,"/api/Member/MyHistroyList")
}

//专家点击量更新（同一用户只更新一次）
const UpdateExpertHits = (params) => {
    return wxRequest.requestFun(params,"/api/MemberExpert/UpdateExpertHits")
}

//会员转换为专家
const SwitchExpert = (params) => {
    return wxRequest.requestFun(params,"/api/Member/SwitchExpert")
}

//会员中心 个人信息修改
const UpdateMemberInfo = (params) => {
    return wxRequest.requestFun(params,"/api/Member/UpdateMemberInfo")
}
//新增会员育儿档案
const AddMemberRegular = (params) => {
    return wxRequest.requestFun(params,"/api/Member/AddMemberRegular")
}
//删除会员育儿档案
const RemoveMemberRegular = (params) => {
    return wxRequest.requestFun(params,"/api/Member/RemoveMemberRegular")
}
//修改会员育儿档案
const UpdateMemberRegular = (params) => {
    return wxRequest.requestFun(params,"/api/Member/UpdateMemberRegular")
}
//用户端咨询列表
const QueryMemberConsultationList = (params) => {
    return wxRequest.requestFun(params,"/api/Member/QueryMemberConsultationList")
}

//专家端咨询列表
const QueryExpertConsultationList = (params) => {
    return wxRequest.requestFun(params,"/api/Member/QueryExpertConsultationList")
}

//结束咨询
const EndConsult = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/EndConsult")
}

//咨询评价
const SubmitEvaluation = (params) => {
    return wxRequest.requestFun(params,"/api/Consult/SubmitEvaluation")
}

//兑换推广码
const ExchangeCode = (params) => {
    return wxRequest.requestFun(params,"/api/Member/ExchangeCode")
}

//栏目是否已购买
const CheckIsPurchased = (params) => {
    return wxRequest.requestFun(params,"/api/Trade/CheckIsPurchased")
}

//栏目简介 
const GetCategoryInfo = (params) => {
    return wxRequest.requestFun(params,"/api/CmsArticle/GetCategoryInfo")
}

//优惠券列表
const GetMemberCoupon = (params) => {
    return wxRequest.requestFun(params,"/api/Member/GetMemberCoupon")
}

//优惠券信息
const ShowCoupon = (params) => {
    return wxRequest.requestFun(params,"/api/Trade/ShowCoupon")
}

//领取优惠券
const AddMemberCoupon = (params) => {
    return wxRequest.requestFun(params,"/api/Trade/AddMemberCoupon")
}

//优惠券购买内容
const CouponBuy = (params) => {
    return wxRequest.requestFun(params,"/api/Trade/CouponBuy")
}

//已购买商品列表
const GetMemberPurchased = (params) => {
    return wxRequest.requestFun(params,"/api/Member/GetMemberPurchased")
}

//判断用户是否有咨询权限
const CheckSubmitConsult = (params) => {
    return wxRequest.requestFun(params,"/api/Trade/CheckSubmitConsult")
}

//获取直播截图
const GetCaptureImg = (params) => {
    return wxRequest.requestFun(params,"/api/Live/GetCaptureImg")
}

//直播列表
const GetLiveChannels = (params) => {
    return wxRequest.requestFun(params,"/api/Live/GetLiveChannels")
}

//判断直播是否已购买
const CheckLiveIsPurchased = (params) => {
    return wxRequest.requestFun(params,"/api/Trade/CheckLiveIsPurchased")
}

//保利威外部授权信息
const GetWxOpenLiveInfo = (params) => {
    return wxRequest.requestFun(params,"/api/Live/GetWxOpenLiveInfo")
}

//会员商品可用优惠券
const GetMemberBuyCoupon = (params) => {
    return wxRequest.requestFun(params,"/api/Member/GetMemberBuyCoupon")
}

//判断用户是否存在
const CheckUserLogin = (params) => {
    return wxRequest.requestFun(params,"/api/WxOpen/CheckUserLogin")
}

//获取推荐信息
const GetMemberRecommen = (params) => {
    return wxRequest.requestFun(params,"/api/Recommen/GetMemberRecommen")
}

//查询未读消息总数
const GetAllAcceptRecommenCount = (params) => {
    return wxRequest.requestFun(params,"/api/Recommen/GetAllAcceptRecommenCount")
}

//推荐列表
const GetRecommenList = (params) => {
    return wxRequest.requestFun(params,"/api/Recommen/GetRecommenList")
}

//查询推荐助力列表
const GetAcceptRecommenList = (params) => {
    return wxRequest.requestFun(params,"/api/Recommen/GetAcceptRecommenList")
}

//助力
const AcceptRecommen = (params) => {
    return wxRequest.requestFun(params,"/api/Recommen/AcceptRecommen")
}

//获取推荐海报
const GetRecommenPoster = (params) => {
    return wxRequest.requestFun(params,"/api/Recommen/GetRecommenPoster")
}

//设置推荐下的助力全部为已读
const SetRecommenIsRead = (params) => {
    return wxRequest.requestFun(params,"/api/Recommen/SetRecommenIsRead")
}

//判断是否已助力
const CheckMyAcceptRecommen = (params) => {
    return wxRequest.requestFun(params,"/api/Recommen/CheckMyAcceptRecommen")
}

//判断是否已经推荐
const CheckIsRecommen = (params) => {
    return wxRequest.requestFun(params,"/api/Recommen/CheckIsRecommen")
}

//获取直播间信息
const GetExpertLive = (params) => {
    return wxRequest.requestFun(params,"/api/Live/GetExpertLive")
}
export default {
    getToken,
    GetAccessToken, 
    Code2Session,
    WxUserRegister,
    SmsSendCode,
    UpdateMemberPhone,
    BannerList,
    CategoryList,
    ArticleList,
    ArticleIndexList,
    ProfessorList,
    ExpertList,
    SearchHotList,
    ArticleHistoryList,
    ArticleCommendList,
    AddArticleCommend,
    ArticleSysRecommend,
    UpdateArticleHits,
    SearchList,
    UpdateArticleCommendLiked,
    UpdateArticleCollection,
    UpdateArticleShared,
    addMemberRegisterStepOne,
    addMemberRegisterStepTwo,
    QueryMilkPowderList,
    QueryFeedingList,
    QueryChildcareList,
    QueryRegionList,
    QueryConsultationRoleList,
    QueryConsultationAgeTypeList,
    QueryConsultationTagList,
    addConsultationStepOne,
    addConsultationStepTwo,
    QueryConsultation,
    addConsultationStepFour,
    ConsultReply,
    ExpertConsultReply,
    GetNewMsg,
    SendMsg,
    uploadFile,
    QueryMemberInfo,
    MyCollectionList,
    MyHistroyList,
    UpdateExpertHits,
    SwitchExpert,
    UpdateMemberInfo,
    AddMemberRegular,
    RemoveMemberRegular,
    UpdateMemberRegular,
    QueryMemberConsultationList,
    QueryExpertConsultationList,
    EndConsult,
    SubmitEvaluation,
    ExchangeCode,
    CheckIsPurchased,
    GetCategoryInfo,
    GetMemberCoupon,
    ShowCoupon,
    AddMemberCoupon,
    CouponBuy,
    GetMemberPurchased,
    CheckSubmitConsult,
    GetCaptureImg,
    GetLiveChannels,
    CheckLiveIsPurchased,
    GetWxOpenLiveInfo,
    CheckUserLogin,
    GetMemberRecommen,
    GetAllAcceptRecommenCount,
    GetRecommenList,
    GetAcceptRecommenList,
    AcceptRecommen,
    GetRecommenPoster,
    SetRecommenIsRead,
    GetMemberBuyCoupon,
    CheckMyAcceptRecommen,
    CheckIsRecommen,
    GetExpertLive
}